import request from '@/utils/request'

// 新版公式配置相关
// 公式列表
export function tenantFormulaSettingsList(query) {
  return request({
    url: '/tenantFormulaSettings/list',
    method: 'get',
    params: query
  })
}
// 新增公式配置
export function tenantFormulaSettingsAdd(data) {
  return request({
    url: '/tenantFormulaSettings',
    method: 'post',
    data: data
  })
}
// 编辑公式配置
export function tenantFormulaSettingsEdit(data) {
  return request({
    url: '/tenantFormulaSettings',
    method: 'put',
    data: data
  })
}
// 删除公式配置
export function tenantFormulaSettingsDel(ids) {
  return request({
    url: `/tenantFormulaSettings/${ids}`,
    method: 'delete'
  })
}


// 以下暂时弃用

// 查询公式配置列表
export function listEquation(query) {
  return request({
    url: '/account/equation/list',
    method: 'get',
    params: query
  })
}

// 查询公式配置详细
export function getEquation(id) {
  return request({
    url: '/account/equation/' + id,
    method: 'get'
  })
}

// 新增公式配置
export function addEquation(data) {
  return request({
    url: '/account/equation',
    method: 'post',
    data: data
  })
}

// 修改公式配置
export function updateEquation(data) {
  return request({
    url: '/account/equation',
    method: 'put',
    data: data
  })
}

// 删除公式配置
export function delEquation(id) {
  return request({
    url: '/account/equation/' + id,
    method: 'delete'
  })
}

// 导出公式配置
export function exportEquation(query) {
  return request({
    url: '/account/equation/export',
    method: 'get',
    params: query
  })
} 

/**
 * 公式未知接口
 */
export function getAppEquationList(query) {
  return request({
    url: '/goods/gameattrtemplate/getAppraiseType',
    method: 'get',
    params: query
  })
}

// 新增区服系数
export function addCoeff(data) {
  return request({
    url: '/account/coeff',
    method: 'post',
    data: data
  })
}

// 查询列表
export function getXISHUList(params) {
  return request({
    url:'/account/coeff/list',
    params
  })
}

//删除
export function deleteXISHUList(id) {
  return request({
    url:`account/coeff/${id}`,
    method:'delete'
  })
}